<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                template="./../templates/StakeholderPortalTemplate.xhtml">

    <ui:define name="content">
        <f:view beforePhase="#{reservationManagerBean.initUpdateTouristStatus}"/>
            <h:form id="formMain">  
                <p:dataTable var="fandB" value="#{reservationManagerBean.fandBs}"   
                             selection="#{reservationManagerBean.selectedReservations_status}" >  
                    <f:facet name="header">  
                        List of Reservations 
                    </f:facet>                 

                    <p:column selectionMode="multiple" />

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Customer Name" />  
                        </f:facet>  
                        <h:outputText value="#{fandB.tourist.tourist.firstName}" />  
                    </p:column>  

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Reservation ID" />  
                        </f:facet>  
                        <h:outputText value="#{fandB.id}" />  
                    </p:column>  

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Time start" />  
                        </f:facet>  
                        <h:outputText value="#{fandB.timeBegin}" />  
                    </p:column>  

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Time end" />  
                        </f:facet>  
                        <h:outputText value="#{fandB.timeEnd}" />  
                    </p:column>  

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Customer Status" />  
                        </f:facet>  
                        <h:outputText value="#{fandB.status}" />  
                    </p:column>  

                    <f:facet name="footer">  
                        <p:commandButton id="btn" value="Submit" actionListener="#{reservationManagerBean.updateStatus}"/>
                    </f:facet>
                </p:dataTable>  
            </h:form>  
    </ui:define>
</ui:composition>